﻿package fui.FUIComponents{
	import flash.events.*;
	import flash.display.Sprite;
	import fl.controls.*;
	import fl.containers.ScrollPane;
	import flash.text.TextFormat;
	import fl.data.DataProvider;
	
	public class FUIRecordView extends Sprite{
		private var lists:Array ;
		private var llen:int = 100;
		
		public function FUIRecordView(fields_num:int, xOffset:int, yOffset:int, field_width:int)
		{
			trace("[FUIRecordView]: offset:" + yOffset + " fields number:" + fields_num);
			y = yOffset;
			x = xOffset;
			llen = field_width;
			this.lists = new Array();
			for(var i=0; i< fields_num; i++)
			{
				lists[i] = new List();
				lists[i].x = i*llen;
				lists[i].y = 30;
				lists[i].width = llen;
				addChild(lists[i]);
				trace("new field added");
			}
		}
		public function setData(dps:Object):void
		{
			

			for (var ind = 0; ind < lists.length; ind++)
			{
				trace ("list len" + lists.length);
				trace("elem fro array" + lists[ind]);
				var tmplist:List = List(lists[ind]);
				trace("tmplist" + tmplist);
				var dp:DataProvider = new DataProvider();
				//tmplist.dataProvider = dp;
				tmplist.dataProvider = (DataProvider)(dps["p"+ind]);
				
			}
		}
	}
	
}